{% load static %}

<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>服务器列表</title>
    </head>
    <script type="text/javascript">
        setTimeout(function(){window.location.reload()}, 10000);
    </script>

    <style type="text/css">
    #tdFontColor {color: white;}
    a {color: inherit;}
    </style>

    <link rel="stylesheet" href="{% static "css/ns_tb.css" %}">
    <body bgcolor="#333" >
        <h2 align="center"><font color="FFFFFF">服务器资源监控节点列表</font></h2>

        <table border="2" align="center" class="imagetable">
            <tr>
                <th>序号</th>
                <th>主机名</th>
                <th>IP地址</th>
                <th>内存</th>
                <th>CPU</th>
            </tr>
                {% for item in serverList %}
                    <tr>
                    <td>
                        {{ item.id }}
                    </td>
                    <td>
                        <span id="tdFontColor"><a href='/detail?ip={{ item.ip }}'>{{ item.hostname }}</a></span>
                    </td>
                    <td>{{ item.ip }}</td>
                    <td>{{ item.mem }}%</td>
                    <td>{{ item.cpu }}%</td>
                    </tr>
                {% endfor %}
            </tr>
        </table>
    </body>
</html>

